/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.q1cc.cfs.jamp.schema;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 *
 * @author claus
 */
public class Song {
    public static List<String> keys =Arrays.asList("Persistent ID", "Album Rating Computed", "Kind", "Year", "File Folder Count",
    "Genre", "Date Modified", "Album Rating", "Artist", "Play Date", "Album", "Size", "Play Date UTC",
    "Comments", "Sample Rate", "Location", "Bit Rate", "Date Added", "Name", "Library Folder Count",
    "Track Type", "Total Time", "Rating", "Play Count", "Track Number", "Composer", "Skip Count",
    "Skip Date", "BPM", "TV Show", "Movie", "HD", "Volume Adjustment");
    String[] values;
    
    public Song(){
        values = new String[keys.size()];
    }
    public Song(String[] values){
        if(values!=null)
            this.values=values;
        else
            values = new String[keys.size()];
    }
    
    public void setValue(String key, String value) {
        values[keys.indexOf(key)] = value;
    }
    public void setValue(int key, String value) {
        values[key] = value;
    }
    public String getValue(String key) {
        return values[keys.indexOf(key)];
    }
    public String getValue(int key){
        return values[key];
    }
    public static int getKey(String key) {
        return keys.indexOf(key);
    }
}
